import Vue from 'vue'
import Router from 'vue-router'
import Welcome from "../components/index/Welcome";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Welcome',
      component: Welcome,
      redirect: '/index/'
    },
    {
      path: '/index',
      name: 'index',
      component: Welcome,
      //路由嵌套
      children: [
        {path: '/', component: () => import('@/components/yn/index.vue')},
        {path: '/index/ynAssign', component: () => import('@/components/yn/ynAssign.vue')},
        {path: '/index/ynDepartment', component: () => import('@/components/yn/ynDepartment.vue')},
        {path: '/index/ynDay', component: () => import('@/components/yn/ynDay.vue')},
        {path: '/index/ynDayTarget', component: () => import('@/components/yn/ynDayTarget.vue')},
        {path: '/index/ynWeekTarget', component: () => import('@/components/yn/ynWeekTarget.vue')},
        {path: '/index/ynMonthTarget', component: () => import('@/components/yn/ynMonthTarget.vue')},
        {path: '/index/ynAssignDayFinance', component: () => import('@/components/yn/ynAssignDayFinance.vue')},
        {path: '/index/daySheet', component: () => import('@/components/yn/daySheet.vue')},
        {path: '/index/daySheet2', component: () => import('@/components/yn/daySheet2.vue')},
        {path: '/index/daySheet3', component: () => import('@/components/yn/daySheet3.vue')},
        {path: '/index/daySheet4', component: () => import('@/components/yn/daySheet4.vue')},
        {path: '/index/daySheet5', component: () => import('@/components/yn/daySheet5.vue')},
        {path: '/index/we', component: () => import('@/components/yn/weLogin.vue')},
        {path: '/index/wool', component: () => import('@/components/yn/wool.vue')},
        {path: '/index/month', component: () => import('@/components/yn/monthBalance.vue')},
        {path: '/index/account', component: () => import('@/components/yn/account.vue')},
        {path: '/index/byj', component: () => import('@/components/yn/byj.vue')},
        {path: '/index/loan', component: () => import('@/components/yn/loan.vue')},
        {path: '/index/car', component: () => import('@/components/yn/car.vue')},
      ]
    }
  ]
})
